import request from '@/config/axios'

export interface AssistantGroupVO {
        id: number
        name: string
        sort: number
}

// 查询客服分组列表
export const getAssistantGroupPage = async (params) => {
    return await request.get({url: `/service/assistant-group/page`, params})
}

// 查询客服分组详情
export const getAssistantGroup = async (id: number) => {
    return await request.get({url: `/service/assistant-group/get?id=` + id})
}

// 新增客服分组
export const createAssistantGroup = async (data: AssistantGroupVO) => {
    return await request.post({url: `/service/assistant-group/create`, data})
}

// 修改客服分组
export const updateAssistantGroup = async (data: AssistantGroupVO) => {
    return await request.put({url: `/service/assistant-group/update`, data})
}

// 删除客服分组
export const deleteAssistantGroup = async (id: number) => {
    return await request.delete({url: `/service/assistant-group/delete?id=` + id})
}

// 导出客服分组 Excel
export const exportAssistantGroup = async (params) => {
    return await request.download({url: `/service/assistant-group/export-excel`, params})
}